package com.example.combinecode;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.File;
import java.io.IOException;

import static com.example.combinecode.utils.CombineCodes.runJavaTotal;

@SpringBootApplication
public class CombinecodeApplication {

//    public static void main(String[] args) {
//        SpringApplication.run(CombinecodeApplication.class, args);
//    }

    public static void main(String[] args) {

        File directory = new File("");//设定为当前文件夹
        try {
            System.out.println(directory.getCanonicalPath());//获取标准的路径
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(directory.getAbsolutePath());

        System.out.println("开始了");
        long start = System.nanoTime();
        try {
            runJavaTotal(directory.getCanonicalPath());
        } catch (IOException e) {
            e.printStackTrace();
        }
        long end = System.nanoTime();
        System.out.print("cost: " + (end - start)/1e9 + " seconds");
        System.out.println("完成了");

    }

}
